<?php

namespace app\admin\model;


class Ordercar extends Base
{
    // 表名
    protected $name = 'pur_collectorder';
    //产品
    public function material()
    {
        return $this->belongsTo("Material", 'fk_bdl_bd_material',[],'INNER')->setEagerlyType(0);
    }

    //库存
    public function inventory()
    {
        return $this->belongsTo("Inventory", 'fk_bdl_inventoryid',[],'INNER')->with(['inventoryentryvalue','texture','surface'])->setEagerlyType(0);
    }

    //库存
    public function inventoryone()
    {
        return $this->belongsTo("Inventory", 'fk_bdl_inventoryid',[],"LEFT")->with(['inventoryentryvalue'])->setEagerlyType(0);
    }
}
